<template>
  <div id="client">
    <p style="position: relative; right: 180px; scale: 0.8; width: 1700px">
      <span class="demonstration" style="margin-left: 20px">单据日期：</span>
      <el-date-picker
        v-model="value2"
        type="daterange"
        align="right"
        unlink-panels
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        :picker-options="pickerOptions"
      >
      </el-date-picker>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 商品：<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="请输入商品"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="dialogFormVisible = true"
        >...</el-button
      >
      &nbsp;&nbsp;&nbsp; 供应商：<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="请输入供应商"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="dialogFormVisible = true"
        >...</el-button
      >
      &nbsp;&nbsp;&nbsp; 采购人员：<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="请输入采购人员"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="elchoose = true"
        >...</el-button
      >
      &nbsp;&nbsp;&nbsp;
      <el-button type="primary">查询</el-button>
    </p>
    <p style="text-align: center; scale: 0.8; margin-top: 20px; width: 100%">
      <span style="font-weight: bolder; font-size: 22px">商品采购明细表</span>
      <span style="display: inline-block; float: right">
        <el-button>导出</el-button>
        <el-button>打印</el-button>
      </span>
      <el-divider style="width: 1500px"></el-divider>
    </p>
    <el-table :data="tableData" border style="width: 100%"
    show-summary>
      <el-table-column prop="id" label="商品编号" width="150px">
      </el-table-column>
      <el-table-column prop="name" label="商品名称" width="150px">
      </el-table-column>
      <el-table-column prop="type" label="规格型号" width="150px">
      </el-table-column>
      <el-table-column prop="brand" label="品牌" width="150px">
      </el-table-column>
      <el-table-column prop="dw" label="基本单位" width="150px">
      </el-table-column>
      <el-table-column prop="orderDate" label="订单日期" width="150px">
      </el-table-column>
      <el-table-column prop="sellid" label="采购订单编号" width="150px">
      </el-table-column>
      <el-table-column prop="sellman" label="采购人员" width="150px">
      </el-table-column>
      <el-table-column prop="kehu" label="供应商" width="150px">
      </el-table-column>
      <el-table-column prop="ck" label="仓库" width="150px"> </el-table-column>
      <el-table-column prop="status" label="状态" width="150px">
      </el-table-column>
      <el-table-column prop="num" label="基本数量" width="150px">
      </el-table-column>
      <el-table-column prop="price" label="单价" width="150px">
      </el-table-column>
      <el-table-column prop="sellmoney" label="采购额" width="150px">
      </el-table-column>
      <el-table-column prop="nogonum" label="未入库基本数量" width="150px">
      </el-table-column>
      <el-table-column prop="nogomoney" label="未入库金额" width="150px">
      </el-table-column>
      <el-table-column prop="deliverydate" label="预计交货日期" width="150px">
      </el-table-column>
      <el-table-column prop="godate" label="最后入库日期" width="150px">
      </el-table-column>
      <el-table-column prop="doman" label="制单人" width="150px">
      </el-table-column>
      <el-table-column prop="text" label="备注" width="150px">
      </el-table-column>
    </el-table>
    <div class="block">
      <p style="text-align: center; margin-top: 10px">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage1"
          :page-sizes="[100, 200, 300, 400]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="400"
        >
        </el-pagination>
      </p>
    </div>


    <el-dialog top="20px" title="选择采购人员" :visible.sync="elchoose">
      <EmployeeChoose />
      <div slot="footer" class="dialog-footer">
        <el-button @click="elchoose = false">取 消</el-button>
        <el-button type="primary" @click="elchoose = false">确 定</el-button>
      </div>
    </el-dialog>


  </div>
</template>

<script>
import EmployeeChoose from '../public_com/EmployeeChoose.vue';



export default {
  name: "Schedule",
  components: {
    EmployeeChoose
  },
  data() {
    return {
      elchoose:false,
      currentPage1: 5,
      tableData: [
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
      ],
      dialogFormVisible: false,
      value2: "",
    };
  },
  methods: {
    goto(to) {
      if (this.$route.path !== "/" + to) {
        this.$router.push(to);
      }
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
};
</script>

<style scoped>
.el-button el-button--default el-popover__reference {
  margin-right: 20px;
}

tr {
  border: 1px solid black;
}
</style>